﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;

namespace Saker.Kernel.BLL
{
    public class BasePager : System.Web.UI.Page
    {
        protected override void OnPreRenderComplete(EventArgs e)
        {
            //固定内存大小
            if (30 > 0)
            {
                if ((int)GetMemorySize() > 30)
                {
                    string error = RevokeMemory.ReduceMemoryFootPrint();
                    if (error != "")
                    {
                        //写日志
                    }
                }
            }
            base.OnPreRenderComplete(e);
        }
        public double GetMemorySize()
        {
            return (((double)Process.GetCurrentProcess().WorkingSet64) / 1048576.0);
        }
    }
}
